/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ru.ssau.model.storing.factories;

import ru.ssau.model.storing.DataAccessException;
import ru.ssau.model.storing.ForumDataAccessObject;
import ru.ssau.model.storing.ForumDatabaseDAO;

/**
 *
 * @author Дима
 */
public class ForumDatabaseDAOFactory extends ForumDAOFactory {

    private ForumDatabaseDAO databaseDAO = null;

    @Override
    public ForumDataAccessObject getDAO() {
        if(databaseDAO == null) {
            try {
                databaseDAO = new ForumDatabaseDAO();
            } catch (DataAccessException ex) {
                ex.printStackTrace();
            }
        }
        return databaseDAO;
    }

}
